package com.dt76.smallloanbackenduser.remote.xiaohao;

import com.dt76.smallloanbackenduser.hystrix.xiaohao.ApprovalLoanHystrix;
import com.dt76.smallloanbackenduser.pojo.xiaohao.ApprovalLoan;
import com.dt76.smallloanbackenduser.pojo.xiaohao.BorrowOrderQuery;
import com.dt76.smallloanbackenduser.utils.Page;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "smallloan-backend-service", fallback = ApprovalLoanHystrix.class)
public interface ApprovalLoanRemote {

    @PostMapping(value = "/xiaohao/ApprovalLoan/addApproveLoan", consumes = "application/json")
    int addApproveLoan(@RequestBody ApprovalLoan approvalLoan);

    @PostMapping(value = "/xiaohao/ApprovalLoan/qryAllLoanOrder", consumes = "application/json")
    Page qryAllLoanOrder(@RequestParam("currentPageNo") Integer currentPageNo, @RequestBody BorrowOrderQuery borrowOrderQuery);

    @PostMapping(value = "/xiaohao/ApprovalLoan/qryAllHanderOrder", consumes = "application/json")
    Page qryAllHanderOrder(@RequestParam("currentPageNo") Integer currentPageNo, @RequestBody BorrowOrderQuery borrowOrderQuery);
}
